(global.webpackJsonp = global.webpackJsonp || []).push([ [ "daily/index" ], {
    "0844": function(t, n, i) {
        i.d(n, "b", function() {
            return o;
        }), i.d(n, "c", function() {
            return r;
        }), i.d(n, "a", function() {
            return e;
        });
        var e = {
            courseList: function() {
                return Promise.all([ i.e("common/vendor"), i.e("components/courseList/courseList") ]).then(i.bind(null, "4b60"));
            }
        }, o = function() {
            var t = this, n = (t.$createElement, t._self._c, t.modalShow ? t.__get_style([ t.cancelStyle ]) : null), i = t.modalShow ? t.__get_style([ t.confirmStyle ]) : null;
            t.$mp.data = Object.assign({}, {
                $root: {
                    s0: n,
                    s1: i
                }
            });
        }, r = [];
    },
    "24a2": function(t, n, i) {},
    "24dc": function(t, n, i) {
        i.r(n);
        var e = i("0844"), o = i("ed86");
        for (var r in o) "default" !== r && function(t) {
            i.d(n, t, function() {
                return o[t];
            });
        }(r);
        i("a967");
        var a = i("f0c5"), s = Object(a.a)(o.default, e.b, e.c, !1, null, "03aec27c", null, !1, e.a, void 0);
        n.default = s.exports;
    },
    "258b": function(t, n, i) {
        (function(t) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var e = i("a71e"), o = i("26cb"), r = i("b806"), a = i("db8f"), s = i("0b02"), u = i("8434"), c = i("7960"), d = (i("0cc1"), 
            l(i("03b8")), l(i("801c")));
            function l(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            function f(t) {
                return function(t) {
                    if (Array.isArray(t)) return p(t);
                }(t) || function(t) {
                    if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t);
                }(t) || function(t, n) {
                    if (t) {
                        if ("string" == typeof t) return p(t, n);
                        var i = Object.prototype.toString.call(t).slice(8, -1);
                        return "Object" === i && t.constructor && (i = t.constructor.name), "Map" === i || "Set" === i ? Array.from(t) : "Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i) ? p(t, n) : void 0;
                    }
                }(t) || function() {
                    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
                }();
            }
            function p(t, n) {
                (null == n || n > t.length) && (n = t.length);
                for (var i = 0, e = new Array(n); i < n; i++) e[i] = t[i];
                return e;
            }
            function h(t, n) {
                var i = Object.keys(t);
                if (Object.getOwnPropertySymbols) {
                    var e = Object.getOwnPropertySymbols(t);
                    n && (e = e.filter(function(n) {
                        return Object.getOwnPropertyDescriptor(t, n).enumerable;
                    })), i.push.apply(i, e);
                }
                return i;
            }
            function m(t) {
                for (var n = 1; n < arguments.length; n++) {
                    var i = null != arguments[n] ? arguments[n] : {};
                    n % 2 ? h(Object(i), !0).forEach(function(n) {
                        g(t, n, i[n]);
                    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : h(Object(i)).forEach(function(n) {
                        Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(i, n));
                    });
                }
                return t;
            }
            function g(t, n, i) {
                return n in t ? Object.defineProperty(t, n, {
                    value: i,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : t[n] = i, t;
            }
            var y = {
                components: {},
                data: function() {
                    return {
                        id: "",
                        isShow: !1,
                        bgcolor: "",
                        color: "#fff",
                        info: {},
                        mainColor: "#E1CA98",
                        time: "00:05:35",
                        ganwu: "分享自己的感悟",
                        isShowDaka: !1,
                        isShowGanwu: !1,
                        daka: "不了, 直接打卡",
                        lists: [],
                        page: 1,
                        pageSize: 10,
                        modalShow: !1,
                        inputComcontent: "",
                        is_perception: -1,
                        isRequest: !1,
                        innerAudioContext: "",
                        audio_duration: "00:00",
                        timer: "00:00",
                        isShowAudio: !1,
                        currtime: "",
                        totaltime: "",
                        style: "",
                        is_sign: "",
                        lecturer_logo: "",
                        desc: "",
                        courseLists: {
                            data: [],
                            params: {
                                type: 4,
                                paddingLR: "0px"
                            }
                        },
                        timePlay: ""
                    };
                },
                mounted: function() {},
                computed: m(m({}, (0, o.mapGetters)([ "configs", "user", "isIphone" ])), {}, {
                    cancelStyle: function() {
                        return {
                            backgroundColor: "#fff",
                            color: this.mainColor,
                            border: "1rpx solid " + this.mainColor,
                            "border-radius": "8rpx"
                        };
                    },
                    confirmStyle: function() {
                        return {
                            backgroundColor: this.mainColor,
                            color: "#fff",
                            "border-radius": "8rpx"
                        };
                    }
                }),
                onLoad: function(t) {
                    this.id = t.id || (0, a.getPageId)(this).id, (0, e.isEmpty)(t.pid) || d.default.commit("config/SET_PID", t.pid), 
                    (0, e.isEmpty)(decodeURIComponent(t.scene).split("pid=")[1]) || d.default.commit("config/SET_PID", decodeURIComponent(t.scene).split("pid=")[1]);
                },
                onShow: function() {
                    this.innerAudioContext = wx.getBackgroundAudioManager(), this.innerAudioContext.title = "每日金句", 
                    this.onTimeUpdate(), this.onEnded();
                    var t = this;
                    (0, r.init)(this).then(function(n) {
                        t.getDetail(), t.getCommentList(), t.play();
                    }).catch(function(t) {
                        return console.log(t);
                    });
                },
                onHide: function() {},
                onUnload: function() {},
                onShareAppMessage: function(t) {
                    var n = (0, e.isEmpty)(this.user.id) ? 0 : this.user.id, i = (0, e.isEmpty)(this.id) ? 0 : this.id;
                    return t.from, {
                        title: this.desc,
                        path: "/daily/index?id=" + i + "&pid=" + n
                    };
                },
                onShareTimeline: function() {
                    var t = (0, e.isEmpty)(this.user.id) ? 0 : this.user.id, n = (0, e.isEmpty)(this.id) ? 0 : this.id;
                    return {
                        title: this.desc,
                        query: "id=" + n + "&pid=" + t,
                        imageUrl: this.lecturer_logo
                    };
                },
                methods: {
                    ready: function() {},
                    goCourseDetail: function(t) {
                        (0, u.route)({
                            url: "/course/course/courseDetails",
                            type: 1,
                            data: {
                                id: t.id
                            }
                        });
                    },
                    share: function(t, n) {
                        var i = this;
                        (0, c.h5JudgeLogin)(2).then(function(e) {
                            e || i.goDetail(t.id, n);
                        });
                    },
                    touchAudio: function() {
                        this.isShowAudio ? this.play() : this.pause(), this.isShowAudio = !this.isShowAudio, 
                        this.$forceUpdate();
                    },
                    onEnded: function() {
                        this.innerAudioContext.onEnded(function(t) {});
                    },
                    onTimeUpdate: function() {
                        var t = this, n = this;
                        this.innerAudioContext.onTimeUpdate(function(i) {
                            var e = parseInt(t.innerAudioContext.currentTime);
                            n.timer = (0, a.formatSeconds)(e);
                        });
                    },
                    play: function() {
                        this.innerAudioContext.play();
                    },
                    pause: function() {
                        this.innerAudioContext.pause();
                    },
                    stop: function() {
                        this.innerAudioContext.stop();
                    },
                    surePublish: function() {
                        var t = this, n = {
                            id: t.id,
                            content: t.inputComcontent
                        };
                        (0, s.dailyPerception)(n).then(function(n) {
                            t.modalShow = !t.modalShow, t.ganwu = "已分享过感悟", t.page = 1, t.lists = [], t.getCommentList(), 
                            t.goDetail(n, 2);
                        }), t.is_sign || t.sign(2);
                    },
                    goDetail: function(t, n) {
                        var i = 2 == n ? "" : t, e = 2 == n ? t : "";
                        (0, u.route)({
                            url: "/daily/sign",
                            type: 1,
                            data: {
                                daily_id: i,
                                perception_id: e,
                                type2: n
                            }
                        });
                    },
                    publish: function() {
                        var t = this;
                        if (1 == this.is_perception) return !1;
                        (0, c.h5JudgeLogin)(2).then(function(n) {
                            n || (t.modalShow = !t.modalShow);
                        });
                    },
                    clickCom: function() {
                        this.modalShow = !this.modalShow, this.inputComcontent = "";
                    },
                    perceptionZan: function(t, n) {
                        var i = this;
                        (0, c.h5JudgeLogin)(2).then(function(e) {
                            if (!e) {
                                var o = !t.is_zan, r = {
                                    id: t.id,
                                    d_id: i.id,
                                    type: o ? 1 : 2,
                                    isLoading: !1
                                };
                                (0, s.dailyPerceptionZan)(r).then(function(e) {
                                    i.lists[n].is_zan = !t.is_zan, i.lists[n].zan_num = o ? parseInt(i.lists[n].zan_num) + 1 : parseInt(i.lists[n].zan_num) - 1;
                                });
                            }
                        });
                    },
                    sign: function(t) {
                        var n = this;
                        (0, c.h5JudgeLogin)(2).then(function(i) {
                            if (!i) {
                                var e = {
                                    id: n.id,
                                    isLoading: !1
                                };
                                (0, s.dailySign)(e).then(function(i) {
                                    n.$toast("恭喜您,打卡成功!", "none"), n.ganwu = "分享自己的感悟", n.isShowDaka = !1, 2 != t && n.goDetail(n.id, 1);
                                });
                            }
                        });
                    },
                    lookHistory: function() {
                        (0, u.route)({
                            url: "/daily/list",
                            type: 1,
                            data: {
                                id: this.info.lecturer_id
                            }
                        });
                    },
                    getDetail: function() {
                        var t = this, n = {
                            id: t.id
                        };
                        (0, s.dailyInfo)(n).then(function(n) {
                            t.info = n, t.style = n.style, t.bgcolor = 1 == n.style ? "#fff" : "#3C3D4F", t.color = 1 == n.style ? "#000" : "#fff", 
                            t.innerAudioContext.autoplay = !0, t.innerAudioContext.src = n.audio_url;
                            var i = parseInt(n.audio_duration);
                            t.audio_duration = (0, a.formatSeconds)(i), t.isShowGanwu = 1 == n.term, t.is_perception = n.is_perception ? "1" : "2", 
                            t.ganwu = n.is_perception ? "已分享过感悟" : "分享自己的感悟并打卡", t.ganwu = n.is_sign && !n.is_perception ? "分享自己的感悟" : t.ganwu, 
                            t.is_sign = n.is_sign, t.lecturer_logo = n.lecturer_logo, t.desc = n.title, t.isShowDaka = !n.is_sign && 0 != n.term, 
                            t.courseLists.data = n.relation_courses, t.isShow = !0;
                        });
                    },
                    getCommentList: function() {
                        var n = this, i = this, e = {
                            id: i.id,
                            page: i.page,
                            pagesize: i.pageSize,
                            isLoading: !1
                        };
                        (0, s.dailyPerceptionList)(e).then(function(e) {
                            var o = i.lists, r = e.list;
                            o && 1 != i.page && (r = [].concat(f(o), f(r))), i.lists = r, n.loadingOk = !0, 
                            n.isRequest = 0 == i.lists.length, t.stopPullDownRefresh();
                        });
                    }
                },
                onReachBottom: function() {
                    this.page++, this.getCommentList();
                }
            };
            n.default = y;
        }).call(this, i("543d").default);
    },
    a967: function(t, n, i) {
        var e = i("24a2");
        i.n(e).a;
    },
    d152: function(t, n, i) {
        (function(t) {
            i("1067"), e(i("66fd"));
            var n = e(i("24dc"));
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = i, t(n.default);
        }).call(this, i("543d").createPage);
    },
    ed86: function(t, n, i) {
        i.r(n);
        var e = i("258b"), o = i.n(e);
        for (var r in e) "default" !== r && function(t) {
            i.d(n, t, function() {
                return e[t];
            });
        }(r);
        n.default = o.a;
    }
}, [ [ "d152", "common/runtime", "common/vendor" ] ] ]);